package com.douyuehan.doubao.project.controller;

import com.douyuehan.doubao.common.api.ApiResult;
import com.douyuehan.doubao.project.model.entity.BmsTip;
import com.douyuehan.doubao.project.service.BmsTipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("tip")
public class BmsTipController extends BaseController {

    @Autowired
    private BmsTipService bmsTipService;

    @GetMapping("today")
    public ApiResult<BmsTip> getTodayTip(){
        BmsTip randomTip = bmsTipService.getRandomTip();
        return ApiResult.success(randomTip);
    }

}
